package com.huoyun.car.service;

import java.util.List;

import com.huoyun.car.bean.Driver;
import com.huoyun.car.dao.DriverDao;

public class DriverServiceImpl implements DriverService {
	DriverDao driverDao;

	public DriverDao getDriverDao() {
		return driverDao;
	}

	public void setDriverDao(DriverDao driverDao) {
		this.driverDao = driverDao;
	}

	public void saveDriver(Driver d) {
		driverDao.saveDriver(d);
	}

	public void updateAll(Driver driver) {
		driverDao.updateAll(driver);
	}

	@Override
	public void updateRate(String rate, long count, long id) {
		// TODO Auto-generated method stub
		driverDao.updateRate(rate, count, id);
	}

	@Override
	public Driver getDriverById(long driverId) {
		return driverDao.getDriverById(driverId);
	}

	@Override
	public List<Driver> getDriverByUserId(long userId) {
		return driverDao.getDriverByUserId(userId);
	}

	@Override
	public void delete(long driverId) {
		driverDao.delete(driverId);
	}

	@Override
	public List<Driver> getDriverListByUsername(String username) {
		// TODO Auto-generated method stub
		return driverDao.getDriverListByUsername(username);
	}

	@Override
	public Driver getDriverByIdCardNumber(long userId, String driverIdCardNumber) {
		// TODO Auto-generated method stub
		return driverDao.getDriverByIdCardNumber(userId, driverIdCardNumber);
	}

	@Override
	public Driver getDriverByDrivingLicenseNumber(long userId, String driverDrivingLicenseNumber) {
		// TODO Auto-generated method stub
		return driverDao.getDriverByDrivingLicenseNumber(userId, driverDrivingLicenseNumber);
	}

}
